/**
 * @name ast-edge-gen
 * @id python/ast-edge-gen
 */
import python
import util

from File f,AstNode start,AstNode end,string start_type,string start_value,string end_type,string end_value,string filepath,string end_location,string start_location
where
start.getScope().getEnclosingModule().getFile()=f
and
end.getParentNode()=start
and
prepare_ast_node_id(start, start_type, start_value, start_location)
and
prepare_ast_node_id(end, end_type, end_value, end_location)
and
filepath=f.getAbsolutePath()
and
isSource(f)
select start_type,start_value,end_type,end_value,filepath,end_location,start_location